<?php $ui = $this->load->library('Ui'); ?>
	<h2>Module Manager</h2>
<?php
	$header = $ui->makeOption('<a href="#" rel="#overlay">Get Help With This Page</a>' . ' '.
					anchor('module_manager/admin', 'Manage') . ' '.
					anchor('module_manager/admin/add', 'Install a Module'). ' ', 1 ).
					'<div class="clear"></div>';


$content = '<table cellspacing="1" cellpadding="5" width="100%"><tr class="head"><th>Module Name</th><th>Homepage</th><th width="300px">Description</th><th width="13%">Actions</th></tr>';

	$this->load->helper('url');
	if ($modules){
		foreach($modules as $item)
		{
			$edit = base_url()."static/_css/images/icons/pencil.png";
			$delete = base_url()."static/_css/images/icons/module_delete.png";
			$activate = base_url()."static/_css/images/icons/accept.png";
			
			$id = $item['id'];
			$name = $item['name'];
			$url = $item['projecturl'];
			$desc = $item['description'];
			
			$content .= "<tr><td>".$name."</td><td>".auto_link($url)."</td><td>".$desc."</td><td>".anchor('module_manager/admin/delete/'.$id,"<img src='$delete' />",array('onclick'=>"return confirm('Are you sure you want to Uninstall this module?')"))."</td></tr>\n";
		}
	}
	$content .= '</table>';
	
	echo $ui->makeDialog('Manage Modules'.$header,$content, 'maximize center');
?>

<div class="box_bottom"></div>
<div class="overlay" id="overlay">
	<!-- here is the content for overlay, can be anything -->
	<h2 style="margin:10px 0">Help! <em>Managing Plugins.</em></h2>
	<p>
			<strong>Install a Module</strong><br />
			<span class="help">This allows you to add modules you have downloaded or purchased.</span><br /><br />
	</p>
</div>
